<include file="Public/min-header"/>

<?php $myurl="https://".$_SERVER['SERVER_NAME'];?>
<script type="text/javascript">
    /*
	 * 在线编辑器相 关配置 js 
	 *  参考 地址 http://fex.baidu.com/ueditor/ 
	 */
    window.UEDITOR_Admin_URL = "__ROOT__/Public/plugins/Ueditor/";
    var URL_upload = "{$myurl}{$URL_upload}";
    var URL_fileUp = "{$myurl}{$URL_fileUp}";
    var URL_scrawlUp = "{$myurl}{$URL_scrawlUp}";
    var URL_getRemoteImage = "{$myurl}{$URL_getRemoteImage}";
    var URL_imageManager = "{$myurl}{$URL_imageManager}";
    var URL_imageUp = "{$myurl}{$URL_imageUp}";
    var URL_getMovie = "{$myurl}{$URL_getMovie}";
    var URL_home = "{$myurl}{$URL_home}";
    var URL_Config = "{$myurl}/Admin/Ueditor/getConfig";
</script>
<script type="text/javascript" charset="utf-8" src="__ROOT__/Public/plugins/Ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__ROOT__/Public/plugins/Ueditor/ueditor.all.js"> </script>
 <script type="text/javascript" charset="utf-8" src="__ROOT__/Public/plugins/Ueditor/lang/zh-cn/zh-cn.js"></script>
 <link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
 <script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
 <script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<script type="text/javascript">  

//     var ue = UE.getEditor('xuzhi', {
//         // ... 更多配置
//         serverUrl:URL_Config,
// 		allowDivTransToP:false,
// 		initialFrameHeight:200
// //     });
//         var ue2 = UE.getEditor('lipin', {
//         // ... 更多配置
//         serverUrl:URL_Config,
// 		allowDivTransToP:false,
// 		initialFrameHeight:200
//     });
</script>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-body ">   
                   	<ul class="nav nav-tabs">
                        <foreach name="group_list" item="vo" key="k">
                     		<li <if condition="$k eq 'longhu'">class="active"</if>><a href="javascript:void(0)" data-url="{:U('System/index',array('inc_type'=>$k))}" data-toggle="tab" onclick="goset(this)">{$vo}</a></li>
                     	</foreach>
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('System/handle')}">
                        <!--通用信息-->
                    <div class="tab-content" style="padding:20px 0px;">
                        <div class="tab-pane active" id="tab_tongyong">
                            <table class="table table-bordered">
                                <tbody>
								<tr>
									<td colspan="3">
										<p class="text-warning">
										广告引用链接：/pages/webview/webview?url=https://xjt.zczmer.com/mobile/index/usertop<br>
									</p>
									</td>
								</tr>
                                <tr>
                                    <td>top广告图：</td>
                                    <td>
                                    <input type="text" class="form-control" style="width:350px;" name="longhu_pic" id="longhu_pic" value="{$config.longhu_pic}">
                                    <input type="button" class="btn btn-default" onclick="GetUploadify(1,'longhu_pic','ad','')" value="上传图片">
                                    </td>
									<td><img src="{$config.longhu_pic}" style="width:80px;float:left;"/> *建议宽度750px，高度不限</td>
                                </tr>
                                <tr>
                                    <td>背景色：</td>
                                    <td><input type="text" class="input-sm" name="longhu_bg" value="{$config.longhu_bg}" ></td>
                                	<td>16进制颜色代码</td>
                                </tr>
								<tr>
								    <td>字体色：</td>
								    <td><input type="text" class="input-sm" name="ziti_bg" value="{$config.ziti_bg}" ></td>
									<td>16进制颜色代码</td>
								</tr>
                                <!--<tr>-->
                                <!--    <td>行渐变色：</td>-->
                                <!--    <td><input type="text" class="input-sm" name="longhu_j1" value="{$config.longhu_j1}"/>-><input type="text" class="input-sm" name="longhu_j2" value="{$config.longhu_j2}" ></td>-->
                                <!--	<td>16进制颜色代码</td>-->
                                <!--</tr>-->
								<tr>
								    <td>区间时间数据：</td>
								    <td><input type="text" class="input-sm" name="longhu_shijian1" id="longhu_shijian1" value="{$config.longhu_shijian1}"/>-><input type="text" class="input-sm" name="longhu_shijian2" id="longhu_shijian2" value="{$config.longhu_shijian2}" ></td>
									<td>16进制颜色代码</td>
								</tr>
                                <tr>
                                    <td>显示行数：</td>
                                    <td><input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="input-sm" name="longhu_num" value="{$config.longhu_num}" ></td>
                                	<td>显示多少条排行数据</td>
                                </tr>
                                <tr>
                                    <td>活动须知：</td>
                                    <td class="col-sm-8">
                         				<textarea class="form-control" id="xuzhi" name="xuzhi" style="height:200px">{$config.xuzhi}</textarea>
                                    </td>
                                    <td>显示多少条排行数据</td>
                                </tr>
                                <tr>
                                    <td>礼品详情：</td>
                                    <td class="col-sm-8">
                         				<textarea class="form-control" id="lipin" name="lipin" style="height:200px">{$config.lipin}</textarea>
                                    </td>
                                    <td>显示多少条排行数据</td>
                                </tr>
                                </tbody> 
                                <tfoot>
                                	<tr>
                                	<td><input type="hidden" name="inc_type" value="{$inc_type}"></td>
                                	<td class="text-right"><input class="btn btn-primary" type="button" onclick="adsubmit()" value="保存"></td>
                                	<td></td>
                                	</tr>
                                </tfoot>
                                </table>
                        </div>
                    </div>
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>

<script>
function adsubmit(){
	$('#handlepost').submit();
}

$(document).ready(function(){
	get_province();
});

function goset(obj){
	window.location.href = $(obj).attr('data-url');
}

$(document).ready(function() {
	$('#longhu_shijian1,#longhu_shijian2').daterangepicker({
		format:"YYYY-MM-DD HH:mm",
		singleDatePicker: true,
		showDropdowns: true,
		minDate:'2021-01-01 00:00',
		maxDate:'2030-01-01 00:00',
		startDate:'2022-09-23 00:00',
		showWeekNumbers: true,
		timePicker: true,
		timePickerIncrement: 1,
		timePicker12Hour: false,
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间', 
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
});
</script>
</body>
</html>